<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加店铺会员地址api、JavsShop标签、API使用手册</title>
<link href="../../stylecss.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!--头部-->
<div id="header">
		<div class="header_top">
		<h1><em>JavsShop</em>文档</h1>
		<div class="title_line">
			<a href="/docs/template_help.html">模板制作手册</a>
			<a href="/docs/api/index.html">API文档</a>
			<a href="/docs/tags/index.html">标签文档</a>
		</div>
	</div>
</div>

<script src="${staticserver}/js/common/jquery-1.8.3.min.js"></script>
<script src="${staticserver}/js/common/jquery-form-2.33.js"></script>
<div id="outside">
	<div class="premise">
		<input type="button" value="登录" name="button" id="login"></input>
		<input type="button" value="注销登录" id="logout"></input>
	</div>
<#assign regionSelect = "com.enation.app.shop.core.tag.regions.RegionSelectDirective"?new()>
		<form id="addrForm" method="post" action="/api/shop/memberAddress!add.do">
				<table class="addressdo">
					<tr>
						<th>店铺名称：</th>
						<td>
							<input style="width:80px;" type="text" id="idName" autocomplete="off" value="" name="store_name" isrequired="true" class="aInput ">
						</td>
					</tr>
					<tr>
			          	<th class="required"><em class="pngFix"></em>所在地区：</th>
			        		<td>
			        			<@regionSelect province_name='store_province' city_name='store_city' region_name='store_region' />
			        		</td>
			        </tr>
					<tr>
						<th>详细地址：</th>
						<td>
							<input style="width:80px;" type="text"  autocomplete="off" value="" name="attr" isrequired="true" class="aInput ">
						</td>
					</tr>
					<tr>
						<th>邮编：</th>
						<td>
							<input style="width:80px;" type="text"  autocomplete="off" value="" name="zip" isrequired="true" class="aInput ">
						</td>
					</tr>
					<tr>
						<th>联系方式：</th>
						<td>
							<input style="width:80px;" type="text"  autocomplete="off" value="" name="tel" isrequired="true" class="aInput ">
						</td>
					</tr>
					<tr>
						<th>身份证号：</th>
						<td>
							<input name="id_number" style="width:80px;" type="text"  autocomplete="off" value=""  isrequired="true" class="aInput ">
						</td>
					</tr>
					<tr>
						<th>银行开户名：</th>
						<td>
							<input name="bank_account_name" style="width:80px;" type="text"  autocomplete="off" value=""  isrequired="true" class="aInput ">
						</td>
					</tr>
					<tr>
						<th>公司银行账号：</th>
						<td>
							<input name="bank_account_number" style="width:80px;" type="text"  autocomplete="off" value=""  isrequired="true" class="aInput ">
						</td>
					</tr>
					<tr>
						<th>开户银行支行名称：</th>
						<td>
							<input name="bank_name" style="width:80px;" type="text"  autocomplete="off" value=""  isrequired="true" class="aInput ">
						</td>
					</tr>
					<tr>
						<th>支行联行号：</th>
						<td>
							<input name="bank_code" style="width:80px;" type="text"  autocomplete="off" value=""  isrequired="true" class="aInput ">
						</td>
					</tr>
					<tr>
						<th>开户行地址：</th>
						<td>
							<@regionSelect province_name='bank_province' city_name='bank_city' region_name='bank_region'/>
						</td>
					</tr>
				</table>
				<div class="ensure">
		
					<input type="button" id="btnSubmit" value="确认添加" class="userSubmit">
				</div>
			</form>	
<div id="show">		
<h1>输出结果</h1>	
<textarea  id="frm" >
</textarea>
</div>
</div>
<#include '/docs/fooder.html' />

<script type="text/javascript">
<!--
$(function(){
 
		var addAction = "${ctx}/api/b2b2c/storeApi!apply.do?ajax=yes";
		
		$("#btnSubmit").click(function(){
		 
			$("#addrForm").ajaxSubmit({
				url:addAction,
				type:"post",
				dataType:"html",
		 
				success:function(result){
					 $("#frm").val(result)
					 if(result.result==1){
						alert("恭喜添加成功")
					 }else{
					 };
				},
				error:function(e){
					alert("操作失败！");
				}
			});
		});
	
})
//-->
</script>	
<!--会员登录-->

<script>
$(function(){
	$("#login").click(function(){
		var apiurl="/api/shop/member!login.do?username=18611138651&password=123456";
		$.ajax({
			url:"${ctx}"+apiurl,

			dataType:"json",
			success:function(aa){
				if(aa.result==1){
					alert("恭喜登录成功")
				}
				else{
					alert("用户名和密码错误")
				}
			},
			error:function(){
				alert("api地址错误，请检查");
			}
			
		});
	});
})
</script>
<script>
$(function(){
	$("#logout").click(function(){
		var apiurl="/api/shop/member!logout.do";
		$.ajax({
			url:"${ctx}"+apiurl,

			dataType:"json",
			success:function(bb){
				if(bb.result==1){
					alert("恭喜注销成功")
				}
				else{
					alert("已经注销过了错误")
				}
			},
			error:function(){
				alert("api地址错误，请检查");
			}
			
		});
	});
})
</script>		